<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        .z-tab {
            width: 800px;
            height: 600px;
            margin: 50px auto;
            border: 1px solid #ccc;
        }

        .tab-head {
            display: flex;
            border-bottom: 1px solid #ccc;
        }

        .tab-head div {
            padding: 6px 15px;
            cursor: pointer;
        }

        .tab-content {
            padding: 15px;
        }

        .tab-item {
            display: none;
        }

        .this-show {
            display: block;
        }

        .active {
            background-color: #333;
            color: #fff;
        }
    </style>
</head>

<body>
    <div class="z-tab">
        <div class="tab-head">
            <div class="active">选项卡一</div>
            <div>选项卡二</div>
            <div>选项卡三</div>
        </div>
        <div class="tab-content">
            <div class="tab-item this-show">内容一</div>
            <div class="tab-item">内容二</div>
            <div class="tab-item">内容三</div>
        </div>
    </div>
    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript">
        const tab = new Tab('slide').init();
    </script>
</body>

</html>